package client;


import View.MainWindow;

import java.io.IOException;
import java.net.Socket;

public class ClientManager {
    private static Send send;
    private static Receive receive;
    private Socket socket;
    private MainWindow mainWindow;
    public static Send getSend() {
        return send;
    }

    public ClientManager(MainWindow mainWindow) throws IOException {
        this.mainWindow=mainWindow;
        socket=new Socket("localhost",12345);
    }

    public void run() throws IOException {
        send=new Send(socket);
        new Thread(send).start();
        receive=new Receive(socket,mainWindow);
        new Thread(receive).start();
    }
}
